package constant;

import cn.com.test.controller.OssBean;
import cn.com.test.controller.SpringContextUtil;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by MBENBEN on 2018/6/29.
 */

@RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试
@ContextConfiguration(locations = {"/applicationContext.xml"}) //加载配置文件
public class MainTest {
//    private  OssBean ossBean = (OssBean) SpringContextUtil.getBean("ossBean");

    //    @Resource
//    public OssBean ossBean;// = (OssBean) SpringContextUtil.getBean("ossBean");
    @Test
    public void test1() {
        OssBean ossBean = (OssBean) SpringContextUtil.getBean("ossBean");
        System.out.println(ossBean.toString());
//        System.out.println(ossBean.APP_ID);
//        System.out.println(OssBean.APP_ID);
    }
}
